import { Injectable } from '@angular/core'
import { ObservableStore } from '@shared/classes/ObservableStoreClass'
import { OperateBody } from '@shared/interfaces/operation'

@Injectable()
export class ChargeBackDataService {

  /** 操作请求体 */
  public operateBody$: ObservableStore<OperateBody> = new ObservableStore(new OperateBody())

  constructor() {}

  setOperateBody(body: OperateBody) {
    this.operateBody$.setValue(body)
  }

  resetOperateBody(): void {
    this.operateBody$.setValue(new OperateBody())
  }

  get operateBody(): OperateBody {
    return this.operateBody$.value
  }
}
